<div class="modal-dialog modal-md">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button"
                    class="close"
                    data-dismiss="modal"
                    aria-label="Close"
                    ng-click="closeThisDialog()" style="outline: none;"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title">
                <span ng-show="new">新增餐厅</span>
                <span ng-show="!new">更新餐厅</span>
            </h4>
        </div>
        <form role="form" ng-submit="submit()">
            <div class="modal-body">
                <div class="form-group">
                    <label for="canteen-new-name" class="control-label">餐厅名</label>
                    <input type="text"
                           ng-focus="error.name=''"
                           class="form-control"
                           ng-model="canteen.name"
                           id="canteen-new-name"
                           placeholder="餐厅名">
                    <span ng-show="error.name" class="label label-danger" ng-bind="error.name"></span>
                </div>
                <div class="form-group">
                    <label for="canteen-new-user_id"
                           class="control-label">库存管理员</label>
                    <div class="input-group">
                        <select type="text"
                                class="form-control"
                                id="canteen-new-user_id"
                                ng-model="canteen.user_id"
                                ng-options="item.id as item.name + ' / ' + item.email for item in users">
                        </select>
                        <span class="input-group-btn">
                      <button type="button" ng-click="addManager()" class="btn btn-success btn-flat">新增经理</button>
                    </span>
                    </div>
                    <span ng-show="error.user_id" class="label label-danger" ng-bind="error.user_id"></span>
                </div>
                <div class="form-group">
                    <label for="canteen-new-address" class="control-label">餐厅地址</label>
                    <textarea type="address"
                              ng-focus="error.address=''"
                              class="form-control"
                              ng-model="canteen.address"
                              id="canteen-new-address"
                              rows="5"
                              placeholder="餐厅地址"></textarea>
                    <span ng-show="error.address" class="label label-danger" ng-bind="error.address"></span>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="closeThisDialog()">关闭</button>
                <button type="submit" ladda="saveLoading" class="btn btn-primary">保存</button>
            </div>
        </form>
    </div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->